package com.htsk.city.services.core.dao;

import com.htsk.city.services.core.domain.Post;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.Collection;
import java.util.List;

public interface PostDao extends JpaRepository<Post, Long> {

    Page<Post> findByUserIdAndDelFlag(Long userI,Integer delFlag,Pageable pageable);

    Post findByIdAndUserId(Long id,Long userId);

    Page<Post> findByDelFlag(Integer delFlag,Pageable pageable);

    List<Post> findByIdInAndDelFlag(List<Long> ids, Integer delFlag);

}
